package asboot.wechat.config;

import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.job.builder.JobBuilder;
import org.springframework.batch.core.repository.JobRepository;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
public class BatchProcessingConfig {
	
	@Bean
	Job metaJob(JobRepository jobRepository, @Qualifier("messagePersistStep") Step messagePersistStep) {
		// @formatter:off
		return new JobBuilder("wechatJob", jobRepository)
				.start(messagePersistStep)
				.build();
		// @formatter:on
	}

}
